
#include "gui/objects/GUIMap.h"

namespace gui {


GUIMap::GUIMap(GUIObjectDrawer* drawer, Map* map) : factory(drawer) {
	this->map = map;
}

GUIMap::~GUIMap() {

}

//int GUIMap::getTotalHeight() {
//	return gui::toPixels(this->map->getFartherSouth() - this->map->getFartherNorth()) + 2 * CHANGUI_IN_PIXELS;
//}
//
//int GUIMap::getTotalWidth() {
//	return gui::toPixels(this->map->getFartherEast() - this->map->getFartherWest()) + 2 * CHANGUI_IN_PIXELS;
//}
//
//
//int GUIMap::getTopLimit() {
//	return gui::toPixels(this->map->getFartherNorth()) - CHANGUI_IN_PIXELS;
//}
//
//int GUIMap::getLeftLimit() {
//	return gui::toPixels(this->map->getFartherWest()) - CHANGUI_IN_PIXELS;
//}

void GUIMap::addGUIBaseSegment(RoadSegment* roadSegment) {
	GUIObject* obj = this->factory.createGUIBaseSegment(roadSegment);
	this->addObjectToContainer(obj);
}
void GUIMap::addGUIIntersection(Intersection* intersection, RoadType type) {
	GUIObject* obj = this->factory.createGUIIntersection(*intersection, type);
	this->addObjectToContainer(obj);
}
void GUIMap::addGUIRoadSegment(RoadSegment* roadSegment) {
	GUIObject* obj = this->factory.createGUIRoadSegment(roadSegment);
	this->addObjectToContainer(obj);
}
void GUIMap::addGUIRoadArrow(RoadSegment* roadSegment, bool inverted) {
	GUIObject* obj = this->factory.createGUIRoadArrow(roadSegment, inverted);
	this->addObjectToContainer(obj);
}

void GUIMap::addGUIRouteIntersection(MapPoint intersection) {
	GUIObject* obj = this->factory.createGUIRouteIntersection(intersection);
	this->addObjectToContainer(obj);
}
void GUIMap::addGUIMapLocation(MapLocation* mapLocation) {
	GUIObject* obj = this->factory.createGUIMapLocation(mapLocation);
	this->addObjectToContainer(obj);
}

}
